import { Meta, Canvas, Story } from '@storybook/addon-docs';
import { GetColorStory } from './stories/GetColorStory';
import { GetColorV8Story } from './stories/GetColorV8Story';

<Meta title="Packages/Theming/[patterns]" />

# Patterns

The following stories test the performance of the `getColor` and `getColorV8`
functions. The original implementations used `JSON.stringify` for argument
memoization. The updated implementations, introduced in v9.0.1, use `WeakMap`
object comparison to optimize performance.

## `getColor` test

<Canvas>
  <Story name="getColor test">{args => <GetColorStory {...args} />}</Story>
</Canvas>

## `getColorV8` test

<Canvas>
  <Story name="getColorV8 test">{args => <GetColorV8Story {...args} />}</Story>
</Canvas>
